<?php
echo $this->element('menu');
?>
<div class="wrapper_board" style="width:1200px; margin:0px auto 50px;">
<?php
foreach ($categories as $categorie) {
    
    $options[]=$categorie['Categorie']['categoriename'];
    
}
echo $this->Form->create();
echo $this->Form->input('imagename',array('label'=>'Image Name'));
echo '<details><summary>More Options</summary>';
echo $this->Form->input('select', array(
    'options' => $options,
    'empty' => '(choose one)'
));


echo '</details>';

echo $this->Form->end('Search');
?>
</div>
<?php

/* if(!empty($results)){
?>

<table>
    <tr>
        <td>Name</td>
        <td>Avatar</td>
        <td>Category</td>
        <td>Description</td>
        <td>Option</td>
    </tr>
<?php foreach($results as $result): ?>
    <tr>
    	<td><?php echo $result['Image']['name'];?></td>
    	<td><?php echo $this->Html->image($result['Image']['url'], array('alt' => 'CakePHP','width'=>'50px','height'=>'50px'));?></td>
    	<td><?php echo $result['Categorie']['categoriename'];?></td>
    	<td><?php echo $result['Image']['description'];?></td>
        <td><?php echo $this->Html->link('Upload to board', array('controller'=>'Boards','action'=>'viewMyBoard',$result['Image']['id']));?></td>
    </tr>
<?php endforeach; } */?>
    




<div id="list-boards">
    <?php
    if(!empty($results)){
       foreach($results as $result){
    
    ?>
    <div class="col-md-3">
        <div class="wrapper_board">
            
               

            
                <div class="big_board">
                    <?php
                        
                            echo $this->Html->image($result['Image']['url'],
                                                array(
                                                    'alt'=>'CakePHP',
                                                    'width'=>'100%',
                                                    'height'=>'100%'));
                    ?>
                    <!--<img width="100%" height="100%" src="images/img_test.jpg">-->
                </div>
                 <div class="board_title">
                    <div class="image_display_extensions">
                       
                        <p><?php echo 'Name:  '.$result['Image']['name']; ?></p>
                        <p><?php echo 'Category:  '.$result['Categorie']['categoriename']; ?></p>
                        <p><?php echo 'Description:  '.$result['Image']['description']; ?></p>
                    </div> 
                    
                </div>
            <a href="/pinterest/Boards/viewMyBoard/<?php echo $result['Image']['id']; ?>">Upload to Board</a>


           
        </div>
    </div>
    <?php
        }
     }else{
        echo "Khong co";
     }
    ?>
</div>